package com.example.jdcompetition.Service;

import org.springframework.stereotype.Service;
import org.springframework.web.servlet.handler.WebRequestHandlerInterceptorAdapter;

/**
 * @author henrydai
 * @date 2021/6/18 16:43
 */
@Service
public class MemoryService {
    public String getMemory()
    {
        double total = (Runtime.getRuntime().totalMemory()) / (1024.0 * 1024);  //MB
        return "total use JVM :"+total+"MB";
    }
}
